package com.study.strategy;

/**
 * @Author tanglingyu
 * @Date: 2021/05/08/ 9:32
 * @Description
 */
public enum CategoryEnum {
  CAT(1, "猫"),
  DOG(2, "狗");
  private int code;
  private String desc;

  CategoryEnum(int code, String desc) {
    this.code = code;
    this.desc = desc;
  }

  public static int getCodeByEnum(CategoryEnum categoryEnum) {
    return categoryEnum.code;
  }
}
